﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MidApp
{
    public class ManageMessageBelongsToTopic
    {
        /// <summary>
        ///Metoda priradi zpravu tematu.
        /// </summary>
        public static void AssignMessageToTopic(int ThreadID, int MessageID)
        {
            var db = MidApp.LinqUse.DBConn;

            AppLib.MessageBelongsToTopic aux = new AppLib.MessageBelongsToTopic();
            aux.ThreadID = ThreadID;
            aux.MessageID = MessageID;

            db.MessageBelongsToTopics.InsertOnSubmit(aux);
            db.SubmitChanges();

        }

    }
}
